package design_pattern.adapter.test2;

/**
 * Created by WeiDingKuo on 2017/10/25 16:31
 * <p>
 * 适配类，继承被适配类
 * 而是使用直接关联，或者称为委托的方式来实现适配
 */
public class Adepter implements Target {
    private Adaptee adaptee;

    public Adepter(Adaptee adaptee) {
        this.adaptee = adaptee;
    }

    @Override
    public void dosomething() {
        this.adaptee.dosomethingSpecific();
    }
}
